home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
turbovis
/
hsys12.zip
/
HELPSYS.DOK
< prev
next >
Wrap
Text File
|
1994-01-31
|
25KB
|
705 lines
┬ ┬ ┌─────┤
├──┤ elp └─┐ ys
████████████████████████████ ┴ ┴ ├─────┘ ████████████████████████████
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
■ HelpSys 1.0
Welcome to HelpSys V1.0, the universal Turbo-Vision helpfile creating
utility. HelpSys is a complete help-project-managing utility, that makes
it is easy to create, compile, maintain and debug Turbo-Vision style
helpfiles.
The included im- and exporters support converting existing helptexts
and helpfiles into other formats. It's possible to create multi-target
helpfile, e.g. to create turbo-vision and windows helpfile in just one
project.
■ Installation
All HelpSys files should be copied into there own directory. HelpSys
will create a subdirectory for each project.
■ Introduction
This introduction will show how to create a new project, write helptopics,
insert links and add the compiled helpfile into your Turbo-Vision program.
And some tricks how to optimize the help system.
Attention: You should be familar with programing Turbo Vision and using
Borland Pascal.
Step 1.) Creating a new project
Press F10|Project|New. Enter the project name, it must be a valid dos
directory name, then enter a short description. HelpSys will open the
project window.
Step 2.) Creating a help topic
Use the NEW-Button to create a new topic and its empty helppage.
A topic has a symbolic name (i.e. aboutbox) that is refering the
helppage, the helpcompiler will generate a pascal context file
(i.e. "hcaboutbox = 14;") that can be used in the program source
code.
The syntax of a topic name is:
symbol[=+|=number|=+number][, symbol[=+|=number|=+number][...]]
The symbolic topic name can be any combination of characters and
numbers, a topicpage can have multiple topic names. After the topic
name a topic number can follow, otherwise HelpSys will assign
a topic number during compilation.
More symbolic topic names can be defined by separating them with comma.
I.e.:
foo assigns a topic FOO
baa=100 assigns a topic BAA with page number 100
foo1, baa1, baa2=200 multiple assignment
When the topic is defined, it will appear in the topic list of the
project window. After placing the focus on the topic and pressing ENTER,
the topic editor will be opend. It will look something like that:
; topic created 05.07.93 09:11:37
;
.TOPIC about
;
<- up from here it's your job!
#f{About:about}#!
▀▀▀▀▀▀▀▀
This is a about box.
^
│
└─ this is the first column
The first four lines are created automaticly by HelpSys. They should
never be changed manualy!!
The format of a help page is quite simple: Any text can be written into
it.
Some special hints:
- Text begining in the first column will be wrapped, if it does not fit
into the window. All adjacent wrappable lines are wrapped as a
paragraph. To avoid wrapping, text must start with one or more
blanks.
- Comments can be placed into helptext begining with a ";" in the
first column.
Attention: HelpSys has a special methode to save topics. Due to
that methode, it is not possible to place comments at
the end of a topic file. If a comment must be placed at
the end, please use the ".ENDTOPIC" command to define
the end of a topic.
- A compiler keyword is defined by placing a "." into the first column,
following the keyword.
Links to other pages can be inserted by placing cross references (links)
into the text. The syntax of a link is:
{link description:topic}
If the link description is equal to the topic, the topic can be omited.
The text in the brackets is highlighted by the help viewer. This text
can be selected and will take the user to that topic page.
To insert links to already defined pages, the local editor function
"insert link" (Alt+F10 or ^k^t) is helpfull...
Step 3.) Compiling
After writing all (or some) pages, the helpfile can be compiled by using
F10|Run|Compile (F9) or F10|Run|Run (Ctrl+F9). The methode of this
functions is equal the pascal compiler: COMPILE will compile every time
again, RUN will only compile, if it is needed otherwise it will run
the helpfile at once.
After errorfree compilation HelpSys will parse the pascal symbol file
and display a topics list and the page numbers created for the pages.
Now it's possible to test the helpfile by pressing ENTER after focusing
the corrosponding topic. A helpwindow will be opend and the helptext
will be displayed. Choose between continuing displaying helptextes
from the topics window or switch to the helpwindow and testing the
helppage links.
If an error is encounted during compilation, the belonging topic will
be opened and the position of the error will be marked and an error
description will be shown.
Step 4.) Including help into Turbo-Vision
Hint: The HelpSys package includes a sample program in the EXAMPLE dir.
See this for a complete example about usage of help inside your
Turbo Vision program.
Including help into Turbo-Vision is quite easy: Each TView object and
the descendants own a constant "helpctx". If F1 is pressed, Turbo-Vision
will determine by calling the GETHELPCTX-methode the value of the actual
helpctx.
So the only thing to do is assigning the constants from the pascal
symbol file made by HelpSys to the belonging objects. A dialog would
look something like this:
constructor texampledialog.init;
{...}
begin
{...}
inherited init(r,'Preferences');
helpctx:=hcpreverences_dialog; {.topic preverences_dialog }
p:=new(Pinputline, Init(R,100)));
p^.helpctx:=hctheinputlinehelp; {.topic theinputlinehelp }
insert(p);
{...}
p:=new(Pbutton, Init(R,'Buttontext',cmok,bfdefault)));
p^.helpctx:=hcbuttonhelp; {.topic buttonhelp }
insert(p);
r.assign(01,06,49,07);
p:=new(PCheckboxes, Init(R,
NewSItem('a Tcheckboxs field',
NewSItem('a Tcheckboxs field',
NewSItem('a Tcheckboxs field',
NewSItem('a Tcheckboxs field',Nil)))));
p^.helpctx:=hc1000;
insert(p);
SelectNext(False);
end;
TCheckboxes and TRadiobuttons will give back "helpnumber" for the first
item, "helpnumber+1" for the next item and so one. This is very nice, if
help is needed for each item, but mostly it is not usefull. To deal with
this problem, there is only ONE solution:
function tsetupdialog.gethelpctx;
Var tmp : word;
begin
tmp:=inherited gethelpctx;
case tmp of
hc1000..hc1010-1 : tmp:=hchelpforcheckboxes;
end;
gethelpctx:=tmp;
end;
Attention: The way of defining a multi-topic line will not work. It
might work most times, but is not sure to assume, that
HelpSys generates consecutive topic numbers.
(It will not. HelpSys will try to create consecutive
numbers, but it also will try to fill gaps. It won't work,
neither TVHC nor HelpSys can do that job. So its better to
be one the sure side....)
If help is needed for every item, I suggest the following workaround:
function tsetupdialog.gethelpctx;
Var tmp : word;
begin
tmp:=inherited gethelpctx;
case tmp of
hc1000+00 : tmp:=hc_help_for_item1;
hc1000+01 : tmp:=hc_help_for_item2;
hc1000+02 : tmp:=hc_he